import requestProxy from '@/utils/request';
const { request } = requestProxy;

// tab列表
export function tabList(params) {
  return request({
    url: '/admin/up/tab',
    method: 'get',
    params
  });
}

// 列表
export function getFilterList(params) {
  return request({
    url: '/admin/up/list',
    method: 'get',
    params
  });
}

// 新建达人
export function addUp(data) {
  return request({
    url: '/admin/up/create',
    method: 'post',
    data
  });
}

// 达人初筛详情
export function upDetail(id) {
  return request({
    url: `/admin/up/detail/${id}`,
    method: 'get'
  });
}

export function inviteScore(data) {
  return request({
    url: '/admin/up/score/invite',
    method: 'post',
    data
  });
}

export function postScore(data) {
  return request({
    url: '/admin/up/score',
    method: 'post',
    data
  });
}

export function deleteUp(id) {
  return request({
    url: `/admin/up/${id}`,
    method: 'delete'
  });
}
export function exportUp(params) {
  return request({
    url: '/admin/up/export',
    method: 'get',
    params
  });
}
export function importUp(data) {
  return request({
    url: '/admin/up/import',
    method: 'post',
    data
  });
}
export function importUpTemplate() {
  return request({
    url: '/admin/up/template',
    method: 'get'
  });
}
export function scorerList(params) {
  return request({
    url: '/admin/up/score/scorer',
    method: 'get',
    params
  });
}
// 评论列表
export function getFilterComments(params) {
  return request({
    url: '/admin/up/comments/list',
    method: 'get',
    params
  });
}

// 发表评论
export function filterCommentAdd(data) {
  return request({
    url: '/admin/up/comments/add',
    method: 'post',
    data
  });
}

// 表单提交、获取审批流
export function formSubmit(data) {
  return request({
    url: `/admin/up/formSubmit`,
    method: 'post',
    data
  });
}

// 发起审批
export function launchFilter(data) {
  return request({
    url: '/admin/up/launch',
    method: 'post',
    data
  });
}

// 流程审批
export function filterProcessAudit(data) {
  return request({
    url: '/admin/up/process/audit',
    method: 'post',
    data
  });
}

// 流程 - 撤销
export function upProcessRevocation(data) {
  return request({
    url: '/admin/up/process/revocation',
    method: 'post',
    data
  });
}

// 流程 - 撤回
export function upProcessRecall(data) {
  return request({
    url: '/admin/up/process/recall',
    method: 'post',
    data
  });
}

